import * as ajax from "../../common/ajax";

export const get = id => ajax.get("/member/area/" + id);

export const create = entity => ajax.post("/member/area", entity);

export const deleteItem = id => ajax.pureDelete("/member/area/" + id);

export const update = entity => ajax.put("/member/area", entity);

export const getPageCount = name =>
    ajax.get("/member/area/page/count", {
        name: name
    });

export const getPage = (index, name) =>
    ajax.get("/member/area/page/" + index, {
        name: name
    });

export const listName = () => ajax.pureGet("/member/area/names");

export const pageSize = 20;
